package com.qf.assetsappraisal;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * @author H
 * @create 2020-11-03 14:34
 * @strive To be whoever you want to be.
 * @Description: 资产评估表（借款额度）  assetsappraisal
 * id，借款人id（外键），
 * <p>
 * 凭证名称（手机号，身份证，驾驶证，等-证书、车、房），凭证照片，评估金额，评估日期
 * <p>
 * id,borrowerId,
 * <p>
 * certificateName,certificatePhoto,assessment,assessTime
 */
@Entity
@Data
@Table(name = "assetsappraisal")
/*public class Assetsappraisal {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Column(name = "borrower_id")
    private Integer borrowerId;
    @Column(name = "certificate_name")

    private String certificateName;

    @Column(name = "certificate_photo")
    private String certificatePhoto;

    @Column(name = "assess_ment")
    private Double assessMent;

    @Column(name = "assess_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd\'T\'HH:mm:ss.S\'Z\'",timezone = "GMT")
    private Date assessTime;

    //备用
    private String Reserve;
    //备用
    private String Reserve1;
}*/

public class Assetsappraisal {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Column(name = "borrower_id")
    private Integer borrowerId;
    @Column(name = "certificate_name")

    private String certificateName;

    @Column(name = "certificate_photo")
    private String certificatePhoto;
    @Column(name = "assess_ment")
    private Double assessMent;

    @Column(name = "assess_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//    @JsonFormat(pattern = "yyyy-MM-dd\'T\'HH:mm:ss.S\'Z\'", timezone = "GMT+8")
//    @JsonFormat(pattern = "yyyy-MM-dd\'T\'HH:mm:ss.S\'Z\'",timezone = "GMT")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date assessTime;
    //备用
    private String reserve;

    public String getReserve() {
        return reserve;
    }

    public void setReserve(String reserve) {
        this.reserve = reserve;
    }

    public String getReserve1() {
        return reserve1;
    }

    public void setReserve1(String reserve1) {
        this.reserve1 = reserve1;
    }

    //备用
    private String reserve1;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getBorrowerId() {
        return borrowerId;
    }

    public void setBorrowerId(Integer borrowerId) {
        this.borrowerId = borrowerId;
    }

    public String getCertificateName() {
        return certificateName;
    }

    public void setCertificateName(String certificateName) {
        this.certificateName = certificateName;
    }

    public String getCertificatePhoto() {
        return certificatePhoto;
    }

    public void setCertificatePhoto(String certificatePhoto) {
        this.certificatePhoto = certificatePhoto;
    }

    public Double getAssessMent() {
        return assessMent;
    }

    public void setAssessMent(Double assessMent) {
        this.assessMent = assessMent;
    }

    public Date getAssessTime() {
        return assessTime;
    }

    public void setAssessTime(Date assessTime) {
        this.assessTime = assessTime;
    }
}
